/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.1  (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the
 * License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */
/**
 * Nudr_DataRepository API OpenAPI file
 * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
 * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 2.1.2
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "UpuData_2.h"

namespace oai::udr::model {

UpuData_2::UpuData_2() {
  m_SecPacket = "";
  m_SecPacketIsSet = false;
  m_DefaultConfNssaiIsSet = false;
  m_RoutingId = "";
  m_RoutingIdIsSet = false;
}

UpuData_2::~UpuData_2() {}

void UpuData_2::validate() {
  // TODO: implement validation
}

void to_json(nlohmann::json &j, const UpuData_2 &o) {
  j = nlohmann::json();
  if (o.secPacketIsSet())
    j["secPacket"] = o.m_SecPacket;
  if (o.defaultConfNssaiIsSet() || !o.m_DefaultConfNssai.empty())
    j["defaultConfNssai"] = o.m_DefaultConfNssai;
  if (o.routingIdIsSet())
    j["routingId"] = o.m_RoutingId;
}

void from_json(const nlohmann::json &j, UpuData_2 &o) {
  if (j.find("secPacket") != j.end()) {
    j.at("secPacket").get_to(o.m_SecPacket);
    o.m_SecPacketIsSet = true;
  }
  if (j.find("defaultConfNssai") != j.end()) {
    j.at("defaultConfNssai").get_to(o.m_DefaultConfNssai);
    o.m_DefaultConfNssaiIsSet = true;
  }
  if (j.find("routingId") != j.end()) {
    j.at("routingId").get_to(o.m_RoutingId);
    o.m_RoutingIdIsSet = true;
  }
}

std::string UpuData_2::getSecPacket() const { return m_SecPacket; }
void UpuData_2::setSecPacket(std::string const &value) {
  m_SecPacket = value;
  m_SecPacketIsSet = true;
}
bool UpuData_2::secPacketIsSet() const { return m_SecPacketIsSet; }
void UpuData_2::unsetSecPacket() { m_SecPacketIsSet = false; }
std::vector<Snssai> &UpuData_2::getDefaultConfNssai() {
  return m_DefaultConfNssai;
}
void UpuData_2::setDefaultConfNssai(std::vector<Snssai> const &value) {
  m_DefaultConfNssai = value;
  m_DefaultConfNssaiIsSet = true;
}
bool UpuData_2::defaultConfNssaiIsSet() const {
  return m_DefaultConfNssaiIsSet;
}
void UpuData_2::unsetDefaultConfNssai() { m_DefaultConfNssaiIsSet = false; }
std::string UpuData_2::getRoutingId() const { return m_RoutingId; }
void UpuData_2::setRoutingId(std::string const &value) {
  m_RoutingId = value;
  m_RoutingIdIsSet = true;
}
bool UpuData_2::routingIdIsSet() const { return m_RoutingIdIsSet; }
void UpuData_2::unsetRoutingId() { m_RoutingIdIsSet = false; }

} // namespace oai::udr::model
